import { Destroyable, react, reactJson, Event, track, bind } from "xbsj-xe2/dist-node/xe2-base-utils";


export class CompontentManager extends Destroyable {

    public createEvent = this.disposeVar(new Event<[{ component: string, id: string }]>());
    public deleteEvent = this.disposeVar(new Event<[{ component: string, id: string }]>());

    constructor() {
        super()

    }
    // 创建组件
    createCompontent(data: { component: string, id: string }) {
        this.createEvent.emit(data)
    }

    // 销毁组件
    deleteCompontent(data: { component: string, id: string }) {
        this.deleteEvent.emit(data)
    }
}

